<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <style type="text/css">
        #div1 {
            line-height: 2em;
        }

        input {
            color: white;
            background-color: slategray;
        }
        #randomCode{
            position: absolute;
            top: 100px;
            left: 200px;
            width: 70px;
            height: 30px;
        }
    </style>
</head>
<body class="hold-transition login-page">
<div class="login-box">
    <h3 style="color: red">${msg}</h3>
<%--    <img src="http://localhost:8080/backimg.png">--%>
    <div id="div1" class="login-box-body">
        <div class="login-box-msg">请输入账号密码</div>
        <form action="/login" method="post">
            <div class="form-group has-feedback">
                <input type="text" placeholder="请输入账号" name="username"
                       value="${cookie.username.value}">
            </div>
            <div class="form-group has-feedback">
                <input type="password" placeholder="请输入密码" name="password" class="bui-input" autocomplete="off">
            </div>
            <div class="row">
                <div class="col-xs-8">
                    <input type="text" class="form-control"  placeholder="请输入验证码" name="randomCode">
                </div>
                <div class="col-xs-4">
                    <script>
                        function changeImg(){
                            document.getElementById("randomCode").src = '/randomCode?' + Math.random();
                        }
                    </script>
                    <img id="randomCode" alt="验证码" src="/randomCode" onclick="changeImg()">
                </div>
            </div>
            <div class="col-xs-4">
                <input type="submit" value="登录">
            </div>
        </form>
    </div>
</div>
</body>
</html>
